﻿CREATE TABLE [dbo].[Messages]
(
	[Id]					[UNIQUEIDENTIFIER]		NOT NULL,
	[CreatedAt]				[DATETIME]				NOT NULL,
	[FromAddressType]		[VARCHAR](1024)			NOT NULL,
	[FromAddress]			[XML]					NOT NULL,
	[ToAddressListType]		[VARCHAR](1024)			NOT NULL,
	[ToAddressList]			[XML]					NOT NULL,
	[CustomDataType]		[VARCHAR](1024)			NOT NULL,
	[CustomData]			[XML]					NOT NULL,
	[Priority]				[INT]					NOT NULL,
	[DispatchedAt]			[DATETIME]				NULL,
	[DoNotDispatchBefore]	[DATETIME]				NULL,
	[InvisibleUntil]		[DATETIME]				NULL,
	CONSTRAINT PK_Messages PRIMARY KEY ([Id])
)
